package com.huidu.bitrade.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.huidu.bitrade.entity.Advertise;
import com.huidu.bitrade.vo.AdvertiseVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

@Mapper
public interface AdvertiseMapper extends BaseMapper<Advertise> {

    List<AdvertiseVo> findAdvertiseList(IPage query,
                                        @Param("marketPrice") double marketPrice,
                                        @Param("coinId") Long id,
                                        @Param("advertiseType")int advertiseType,
                                        @Param("isCertified")int isCertified);

    List<Map<String, String>> selectSellAutoOffShelves(@Param("coinId")Long coinId,
                                                       @Param("marketPrice") BigDecimal marketPrice,
                                                       @Param("jyRate") BigDecimal jyRate);

    List<Map<String, String>> selectBuyAutoOffShelves(@Param("coinId")Long coinId,
                                                      @Param("marketPrice")  BigDecimal marketPrice);
}
